Skip to content

Instantly share code, notes, and snippets.

@Keshav13142
Keshav13142 / .obsidian.vimrc
Last active May 9, 2024 15:38
obsidian-vimrc
" Have j and k navigate visual lines rather than logical ones
nmap j gj
nmap k gk
" Go to beginning/end of line
nmap gh ^
nmap gl $
" Cycle between tabs
exmap tabprev obcommand workspace:previous-tab
@mattifestation
mattifestation / CertTBSHash.ps1
Created September 7, 2017 01:13
Calculates a ToBeSigned hash of a certificate, producing the same uniquely identifying hash present in code integrity rule sets.
# Example: ls 'C:\Windows\System32\*' -Include '*.dll' | Get-AuthenticodeSignature | Select -ExpandProperty SignerCertificate | Get-TBSHash
filter Get-TBSHash {
[OutputType([String])]
param (
[Parameter(Mandatory, ValueFromPipeline)]
[Security.Cryptography.X509Certificates.X509Certificate2]
$Certificate
)
@Faria-Ejaz
Faria-Ejaz / Map.js
Last active May 9, 2024 15:37
react Leaflet Map with Auto-suggest Search #leaflet #react-leaflet #search
/** @format */
import { Map, TileLayer, Marker, Popup } from "react-leaflet";
import React, { useEffect, useState, useRef } from "react";
import { geosearch } from "esri-leaflet-geocoder";
import "leaflet/dist/leaflet.css";
import "esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css";
import L from "leaflet";
function MapView(props) {
@maddouri
maddouri / build-static-python.sh
Created December 6, 2015 22:42
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
@smetronic
smetronic / NMEAParser.cs
Created February 13, 2019 10:02
C# NMEA Parser $GPRMC, $GPGSV, $GPGSA
using System;
using System.Globalization;
public class NmeaInterpreter
{
// Represents the EN-US culture, used for numers in NMEA sentences
public static CultureInfo NmeaCultureInfo = new CultureInfo("en-US");
// Used to convert knots into miles per hour
public static double MPHPerKnot = double.Parse("1.150779",
NmeaCultureInfo);
@fnky
fnky / ANSI.md
Last active May 9, 2024 15:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rxaviers
rxaviers / gist:7360908
Last active May 9, 2024 15:35
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@Klerith
Klerith / basic.html
Last active May 9, 2024 15:33
PΓ‘ginas que usaremos en la secciΓ³n de Formularios Reactivos
<h2>Reactivos: BΓ‘sicos</h2>
<hr>
<div class="row">
<div class="col">
<form autocomplete="off">
<!-- Campo de producto -->
<div class="mb-3 row">
-module(compress_ecdsa_publickey).
-export([compress_ecdsa_publickey/1, test/0]).
compress_ecdsa_publickey(UncompressedPublicKey) ->
%% To binary
UncompressedPublicKeyBin = binary:decode_hex(list_to_binary(UncompressedPublicKey)),
%% Check that the uncompressed public key is valid
case size(UncompressedPublicKeyBin) of
65 ->
%% Remove the prefix (first byte) from the public key
@leoherzog
leoherzog / code.gs
Created September 25, 2020 18:57
Google Drive Photocopier - Make lots of copies of a file in Drive
// (copy this into a new Apps Script project - https://script.google.com/)
// Hello!
//
// To make lots of copies of a thing in Google Drive,
// put the ID or URL of the Google Drive file here:
//
var fileToCopy = "https://jamboard.google.com/d/1jwdBuEjFtGvAjaRIsxXkR-nm-EgL2cES8UGOjREvdj0/viewer";
//
// Quotes are important! Example:
// var fileToCopy = "https://docs.google.com/document/d/1TIDOiUpPiWNqKqduKlbtm2O4jgFIAPrxuz_JFWzod9s/edit?usp=sharing";